home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’90 / DeanHack / DeanHack.a next >
Encoding:
Text File  |  1990-06-15  |  1.3 KB  |  43 lines  |  [TEXT/MPS ]

  1.     INCLUDE     'Traps.a'
  2.     INCLUDE    'SysEqu.a'
  3.     INCLUDE    'SysErr.a'
  4.     INCLUDE    'FSEqu.a'
  5.     INCLUDE     'QuickEqu.a'
  6.  
  7. DeanHack    MAIN
  8.  
  9. ; This is a very quick and dirty FKEY for triggering Dean’s NetBunny hack.
  10.  
  11.     move.l    A2, -(SP)        ; we’ll be using this
  12.     move.l    uTableBase, A0        ; point to unit table
  13.     moveq    #0, D0        ; start with entry 0
  14.     moveq    #0, D2        ; start with entry 0
  15. @unitLoop
  16.     move.l    0(A0, D0), D1        ; handle to DCE
  17.     bz.s    @tryNextDCE        ; if Nil, don't use
  18.     move.l    D1, A1
  19.     move.l    (A1), A1        ; A1 has DCE Pointer
  20.     move.l    (A1), A2        ; Ptr or Handle to driver
  21.     move.b    dCtlFlags+1(A1), D1    ; get flags byte
  22.     btst    #dRamBased, D1        ; test to see if RAM based
  23.     bz.s    @tryNextDCE        ; must be RAM based for us
  24.     move.l    (A2), A2        ; Ptr to driver in RAM
  25.     cmp.l    #$092E4E65, drvrName(A2)    ; check 9'.Ne'
  26.     bne.s    @tryNextDCE        ; if no match, abort
  27.     cmp.l    #$7442756E, drvrName+4(A2)    ; check 'tBun'
  28.     bne.s    @tryNextDCE        ; if no match, abort
  29.     move.l    dCtlStorage(A1), A2    ; handle to storage
  30.     move.l    (A2), A2        ; pointer to storage
  31.     move.l    $14(A2), A2        ; pointer to something else
  32.     clr.w    $12(A2)        ; set Dean’s flag. hee hee
  33.     bra.s    @allDone        ; we’re outa here
  34. @tryNextDCE
  35.     addq.w    #4, D0        ; increment DCE index
  36.     addq.w    #1, D2        ; increment count
  37.     cmp.w    UnitNtryCnt, D2        ; are we done?
  38.     blt.s    @unitLoop        ; if more, try next DCE
  39. @allDone
  40.     move.l    (SP)+, A2        ; restore trashed register
  41.     rts
  42.     
  43.     END